﻿using IrelandAlt.ORNetTwitt.Resources;
using OpenRasta.Web;

namespace IrelandAlt.ORNetTwitt.Handlers
{
    public class UserHomeUiResourceHandler
    {
        protected IUserSecurity UserSecurityContext;

        public UserHomeUiResourceHandler(ICommunicationContext communicationContext)
        {
            UserSecurityContext = HandlerHelper.GetUserSecurityContext(communicationContext);
        }

        public OperationResult Get()
        {
            return new OperationResult.OK(new UserHomeUiResource() { User = new UserUiResource(UserSecurityContext) { UserId = 0, UserName = "BEEP" } });
        }

        public OperationResult Get(int id)
        {
            return new OperationResult.OK(new UserHomeUiResource() { User = new UserUiResource(UserSecurityContext) { UserId = id, UserName = "BEEP" } });
        }    
    }
}
